import request from '@/utils/request';

// formdata key: file
export const uploadUrl = '/file-common/upload';
export function upload(data){
  return request({
    url: '/file-common/upload',
    method: 'post',
    data
  })
}
/*
  params: fileId
*/
export function download(params){
  return request({
    url: '/file-common/getFileUrl',
    method: 'post',
    params
  })
}
// 删除文件
/**
 * 
 * @param {fileId: String} params 
 * @returns 
 */
export function delFile(params){
  return request({
    url: '/file-common/removeFile',
    method: 'post',
    params
  })
}